package com.caishi.lkx.exam.ienum.type;

import com.caishi.lkx.exam.service.IChapterService;
import com.caishi.lkx.exam.service.IEveryDayPracticeService;
import com.caishi.lkx.exam.service.IPaperRecordsService;
import com.caishi.lkx.exam.service.QuestionCollectionService;
import com.zzw.common.mysql.MybatisPlusEnum;
import com.zzw.common.service.TypeEnum;

import lombok.Getter;

public enum QuestionCollectionType implements TypeEnum<QuestionCollectionService<?, ?>>, MybatisPlusEnum<String> {
    // 试题集合类型
    chapter("章节", IChapterService.class),
    paper("试卷", IPaperRecordsService.class),
    everyDayPractice("每日一练", IEveryDayPracticeService.class),
    rankError("高频错题", IEveryDayPracticeService.class),
    rankCollect("收藏排行", IEveryDayPracticeService.class),
    hotQue("热门试题", IEveryDayPracticeService.class),
    ;

    public static final String RANK_ERROR_ID = "rankerror";
    public static final String HOT_QUE_ID = "hotque";
    public static final String RANK_COLLECT_ID = "rankcollect";

    @Getter
    private final
    String desc;

    @Getter
    private final
    Class<? extends QuestionCollectionService<?, ?>> serviceBeanClass;


    @Override
    public String getCode() {
        return this.name();
    }

    QuestionCollectionType(String desc, Class<? extends QuestionCollectionService<?, ?>> serviceBeanClass) {
        this.desc = desc;
        this.serviceBeanClass = serviceBeanClass;
    }

}
